<%@ page contentType="text/html;charset=UTF-8" %> 
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<h3>Przedmioty: </h3>

<h6>Przedmioty jakie posiada klasa:</h6>

<c:forEach items="${classSubjects}" var="classSubject" varStatus="status">

<a href="<c:url value="/admin/class/subject/delete" />?id=${classSubject.subjectId}&classId=${param.id}" >
		<img src="<c:url value="/resources/delete.gif" />" /></a>
${classSubject.subjectName}<br />
</c:forEach>

<h6>Dodaj klasie przedmiot:</h6>
<form:form commandName="classSubject">
	<form:errors path="subjectID" cssClass="error_box" /><br />
	<form:select path="subjectID">
		<form:option value="" label="Wybierz przedmiot" />
		<form:options items="${subjectsOptions}"/>
	</form:select> <input type="submit" value="Dodaj" />
</form:form>